const useBatchState = (initialState) => {
    const [state, setState] = useState(initialState)
    const batchSetState = (newState) => {
        setState((prevState) => ({ ...prevState, ...newState }))
    }
    return [state, batchSetState]
}